<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/1/26
 * Time: 19:09
 */

namespace common;

/**
 * Class ApiErrorDic
 * 错误码和错误信息对照字典
 *
 * @package common
 */
class ApiErrorDic
{
    /**
     * API通用错误码
     * code < 1000
     */
    const SUCCESS = [
        'code' => 0,
        'message' => 'success'
    ];
    const UNKNOWN_ERROR = [
        'code' => 1,
        'message' => 'unknown_error'
    ];
    const URL_ERROR = [
        'code' => 2,
        'message' => '404 not found'
    ];
    const NEED_JWT_AUTHORIZATION = [
        'code' => 3,
        'message' => 'unauthorized user'
    ];
    const SHOP_NOT_FOUND = [
        'code' => 4,
        'message' => 'the shop you visit now is not found'
    ];
    const CAPTCHA_INVALID = [
        'code' => 5,
        'message' => "captcha doesn't match"
    ];
    const FIELD_EMPTY = [
        'code' => 6,
        'message' => "this field cannot be empty"
    ];
    const EMAIL_INVALID = [
        'code' => 7,
        'message' => "email invalid"
    ];
    const DATA_NOT_FOUND = [
        'code' => 8,
        'message' => "数据不存在"
    ];
    const LOGIN_FAIL = [
        'code' => 11,
        'message' => 'login fail'
    ];
    const TOKEN_FAIL = [
        'code' => 12,
        'message' => 'token fail'
    ];
    const CHANNEL_NOT_FOUND = [
        'code' => 13,
        'message' => 'payment not found'
    ];
    const MOBILE_INVALID = [
        'code' => 14,
        'message' => '手机号格式不对'
    ];
    const NUMBER_LESS_ZERO = [
        'code' => 15,
        'message' => '金额错误'
    ];
    const EXCEL_DATA_EMPTY = [
        'code' => 31,
        'message' => 'Excel表格中没有数据'
    ];
    const PAD_CUSTOMER_NOT_FOUND = [
        'code' => 21,
        'message' => '客户信息不存在'
    ];


}